package com.fowo.api.controller.purchase.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.List;

@NoArgsConstructor
@Data
public class purchaseArgsDTO {


    @JsonProperty("fromMap")
    private FromMapDTO fromMap;
    @JsonProperty("children")
    private List<ChildrenDTO> children;
    @JsonProperty("toMap")
    private ToMapDTO toMap;

    @NoArgsConstructor
    @Data
    public static class FromMapDTO {
        @JsonProperty("purchase_quantity")
        private Long purchaseQuantity;
        @JsonProperty("id")
        private Long id;
        @JsonProperty("a_status")
        private String aStatus;
        @JsonProperty("del_flag")
        private Boolean delFlag;
        @JsonProperty("create_time")
        private String createTime;
        @JsonProperty("last_update_time")
        private String lastUpdateTime;
        @JsonProperty("warehouse_name")
        private String warehouseName;
        @JsonProperty("last_update_user")
        private Long lastUpdateUser;
        @JsonProperty("oversight_uid")
        private String oversightUid;
        @JsonProperty("create_user")
        private Long createUser;
        @JsonProperty("supplier_id")
        private Long supplierId;
        @JsonProperty("opt_uid")
        private Long optUid;
        @JsonProperty("wid")
        private Long wid;
        @JsonProperty("stauts")
        private String stauts;
        @JsonProperty("supplier_name")
        private String supplierName;
        @JsonProperty("purchase_order_code")
        private String purchaseOrderCode;
        @JsonProperty("fee_part_type")
        private String feePartType;
    }

    @NoArgsConstructor
    @Data
    public static class ToMapDTO {
        @JsonProperty("cost_distribution")
        private String costDistribution;
        @JsonProperty("receipt_type")
        private String receiptType;
        @JsonProperty("other_expenses")
        private BigDecimal otherExpenses;
        @JsonProperty("supplier")
        private Long supplier;
        @JsonProperty("freight")
        private BigDecimal freight;
        @JsonProperty("qc_status")
        private String qcStatus;
        @JsonProperty("create_user")
        private Long createUser;
        @JsonProperty("id")
        private Long id;
        @JsonProperty("warehouse")
        private Long warehouse;
        @JsonProperty("buyer_id")
        private Long buyerId;
        @JsonProperty("order_sn")
        private String orderSn;
        @JsonProperty("status")
        private String status;

        @JsonProperty("receipt_date")
        private String receiptDate;

    }

    @NoArgsConstructor
    @Data
    public static class ChildrenDTO {
        @JsonProperty("fromMap")
        private FromMapDTO fromMap;
        @JsonProperty("toMap")
        private ToMapDTO toMap;

        @NoArgsConstructor
        @Data
        public static class FromMapDTO {
            @JsonProperty("purchase_order_id")
            private Long purchaseOrderId;
            @JsonProperty("quantity_receive")
            private Long quantityReceive;
            @JsonProperty("product_id")
            private Long productId;
            @JsonProperty("id")
            private Long id;
            @JsonProperty("sku")
            private String sku;
            @JsonProperty("del_flag")
            private Boolean delFlag;
            @JsonProperty("application_num")
            private Long applicationNum;
            @JsonProperty("plan_sn")
            private String planSn;
        }

        @NoArgsConstructor
        @Data
        public static class ToMapDTO {
            @JsonProperty("notice_receipt_num")
            private Long noticeReceiptNum;
            @JsonProperty("receipt_num")
            private Long receiptNum;
            @JsonProperty("parent_receipt")
            private Long parentReceipt;
            @JsonProperty("product_id")
            private Long productId;
            @JsonProperty("qc_status")
            private String qcStatus;
            @JsonProperty("no_qc_num")
            private Long noQcNum;
            @JsonProperty("id")
            private Long id;
            @JsonProperty("sku")
            private String sku;
        }
    }
}
